import request from '@/utils/request'

// 查询周报分享人列表列表
export function listWeeklyRecord(query) {
  return request({
    url: '/erp/weeklyRecord/list',
    method: 'get',
    params: query
  })
}

// 查询周报分享人列表详细
export function getWeeklyRecord(userId) {
  return request({
    url: '/erp/weeklyRecord/' + userId,
    method: 'get'
  })
}

// 新增周报分享人列表
export function addWeeklyRecord(data) {
  return request({
    url: '/erp/weeklyRecord',
    method: 'post',
    data: data
  })
}

// 修改周报分享人列表
export function updateWeeklyRecord(data) {
  return request({
    url: '/erp/weeklyRecord',
    method: 'put',
    data: data
  })
}

// 删除周报分享人列表
export function delWeeklyRecord(userId) {
  return request({
    url: '/erp/weeklyRecord/' + userId,
    method: 'delete'
  })
}

// 删除周报分享人列表
export function getErpWeeklyRecordList(data) {
  return request({
    url: '/erp/weeklyRecord/getErpWeeklyRecordList',
    method: 'post',
    data: data
  })
}
